import request from '@/utils/request'
let baseUrl = process.env.NODE_ENV === 'production' ? '/api/risk' : '/riskyf'
// 策略管理列表
export const getStrategyList = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/group-list',
    method: 'post',
    data
  })
// 策略管理详情列表
export const getStrategyDetail = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/list',
    method: 'post',
    data
  })
// 改变状态
export const changeStatus = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/change-status',
    method: 'post',
    data
  })
// 搜索数据源
export const searchField = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/search-field',
    method: 'post',
    data
  })
// 策略发布
export const strategyPublish = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/publish',
    method: 'post',
    data
  })
// 策略评测
export const strategyTest = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/test',
    method: 'post',
    data
  })
// 策略评测通过率POST /std/strategy/pass-rate
export const passRate = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/pass-rate',
    method: 'post',
    data
  })
// 规则命中数POST /std/strategy/rule-hit
export const ruleHit = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/rule-hit',
    method: 'post',
    data
  })
// 规则top10POST /std/strategy/rule-top10
export const ruleTop = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/rule-top10',
    method: 'post',
    data
  })
// 策略报 /std/strategy/get-rules-by-id
export const getRulesId = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/strategy/get-rules-by-id',
    method: 'post',
    data
  })
